home *** CD-ROM | disk | FTP | other *** search
- Path: inforamp.net!ts6-06
- From: rmorin@inforamp.net (Randy Charles Morin)
- Newsgroups: comp.lang.c++
- Subject: Re: Help with key press events in BC OWL
- Date: Sat, 09 Mar 96 19:37:14 GMT
- Organization: MiddleWorld SoftWare
- Message-ID: <4hsmln$rsm@sam.inforamp.net>
- References: <4hn37o$f5v@soap.news.pipex.net>
- NNTP-Posting-Host: ts6-06.tor.inforamp.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <4hn37o$f5v@soap.news.pipex.net>,
- Wayne Smith <fj89@dial.pipex.com> wrote:
- >Can anyone tell me why my OWL application which has a response table, will
- call
- >handlers for mouse button down, mouse move etc, but not any of the handlers
- for key
- >presses eg WM_CHAR WM_SYSKEYDOWN etc. I have correctly included the EV_
- macros in the
- >response table. I have set up a test application which has a TDialog as the
- main
- >window, with two buttons ok/cancel and tried EV_WM_CHAR, EV_WM_SYSKEYDOWN,
- >EV_WM_KEYDOWn in it, also to no avail, whilst the mouse handlers work fine.
-
- I'm assuming you have a button OK and that you want to capture a keystroke
- denoting that the button has been pressed. This is normally the ENTER key,
- the SPACEBAR and even sometimes the ALT-O combination. If this is not what
- you trying to do then these comments do not apply.
-
- Windows autmatically processes the ENTER and SPACEBAR keys for you if you do
- the following things. Set the control ID of the OK button to 1 and make it a
- default pushbutton. You can make the ALT-O key combination work if you set
- the button text to &OK. This informs the user and windows that the ALT-O and
- sometimes just O keystrokes will activate that button. In this case, their is
- no need to handle the EV_WM_CHAR, EV_WM_SYSKEYDOWN and EV_WM_KEYDOWN messages.
-
- Agrivar
-